import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [{
		path: '/',
		redirect: '/home',

	},
	{
		path: '/home',
		component: Home,
		redirect: '/home/index',
		children: [{
				path: 'index',
				name: 'index',
				component: () => import('@/views/home/index/Index.vue'),
			},
			{
				path: 'sort',
				name: 'sort',
				component: () => import('@/views/home/sort/Sort.vue'),
			},
			{
				path: 'mine',
				name: 'mine',
				component: () => import('@/views/home/mine/Mine.vue'),
			},
			{
				path: 'countrypicker',
				name: 'countrypicker',
				component: () => import('@/views/home/countrypicker/CountryPicker.vue'),
			},
		]
	},
	{
		path: '/login',
		name: 'Login',
		component: () => import('@/views/LoginView.vue'),
	},
	{
		path: '/my',
		name: 'My',
		component: () => import('../views/MyView.vue'),
	},
	{
		path: '/search',
		name: 'Search',
		component: () => import('@/views/Search.vue'),
	},
	{
		path: '/search2',
		name: 'Search2',
		component: () => import('@/views/Search2.vue'),
	},
	{
		path: '/noproduct',
		name: 'Noproduct',
		component: () => import('@/views/NoProduct.vue'),
	},
	{
		path: '/phone',
		name: 'Phone',
		component: () => import('@/views/Phone.vue'),
	},
	{
		path: '/app',
		name: 'App',
		component: () => import('@/App.vue'),
	},
]

const router = new VueRouter({
	routes,
})

export default router